package com.kh.statistics.video.controller;

import com.kh.statistics.video.entity.StatisticsReq;
import com.kh.statistics.video.service.VideoStatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName VedioStatisticsController
 * @Description TODO
 * @Author konghong1o
 * @Date 2024/5/7 21:48
 * @Version 1.0
 **/
@RestController
@RequestMapping("video")
public class VideoStatisticsController {

    @Autowired
    private VideoStatisticsService videoStatisticsService;

    @PostMapping("statistics")
    public void statistics(@RequestBody StatisticsReq statisticsReq) {
        videoStatisticsService.statistics(statisticsReq);
    }

    @PostMapping("oneStatistics")
    public void oneStatistics(@RequestBody StatisticsReq statisticsReq) {
        videoStatisticsService.oneStatistics(statisticsReq);
    }
}
